﻿using System;
using System.ComponentModel;
using System.Diagnostics;

namespace XmlStudio.GraphSharp {
    /// <summary>
    /// VertexControl representing single xml param.
    /// </summary>
    [DebuggerDisplay("Id = {Id}")]
    [Serializable]
    public class XmlNodeVertex : IXmlNodeVertex {
        #region Properties
        /// <summary>
        /// Gets the param's id.
        /// </summary>
        [Browsable(false)]
        public string Id {
            get;
            private set;
        }
        #endregion

        #region Constructors
        /// <summary>
        /// Initializes a new instance of the <see cref="XmlNodeVertex"/> class.
        /// </summary>
        /// <param name="id">VertexControl's id.</param>
        public XmlNodeVertex(string id) {
            this.Id = id;
        }
        #endregion

        #region Overrides
        public override string ToString() {
            return this.Id;
        }
        #endregion
    }
}
